package mysweetbasicdemo

import sweet.mvc._

//==> config
class MySweetBasicDemoSweetConfig extends DefaultSweetConfig {
  addControllers(
    "/main" -> new MainController,
    "/admin" -> new AdminController,
    "/quickview" -> new UrlViewController,  //for quick template testing.
    "/quicktask" -> new QuickTaskController  //for quick code/controller testing.
  )
}

//==> controllers
class MainController extends AbstractController {
  handle("/index"){ View("/index", "serverTime" -> new java.util.Date ) }
  handle("/hello"){ PathView() }
}

class AdminController extends AbstractController {
  handle("/sysinfo"){ PathView("sysprops"-> System.getProperties) }
}

class QuickTaskController extends AbstractController

